package com.sysu.ooad.action;

import java.util.Map;

import org.apache.struts2.interceptor.SessionAware;

import com.opensymphony.xwork2.ActionSupport;
import com.sysu.ooad.entity.Student;
import com.sysu.ooad.entity.Teacher;

public class CommonAction extends ActionSupport implements SessionAware{

	protected Map<String, Object> session;
	
	public void setSession(Map<String, Object> session) {
		this.session = session;
	}
	
	public Teacher findCurrentTeacher() {
		return (Teacher)session.get("teacher");
	}
	
	public Student findCurrentStudent() {
		return (Student)session.get("student");
	}
}
